]> dgit.raspbian.org Git - gnome-shell.git/commit
shell/app: Be extra careful when applying GPU environment
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 24 Apr 2026 22:19:36 +0000 (00:19 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 26 Apr 2026 13:06:13 +0000 (15:06 +0200)
commite017af9ee09e7127a70b6ae6fe9da3aa2587aff0
tree35dbbb7e4d75f7f1a113abdde791c5f281f95a60
parentde9d38b5080e16c4ff0ee0e1fd9cec4a5c89cc71
shell/app: Be extra careful when applying GPU environment

We get the environment from SwitcherooControl as an array of
key-value pairs. When applying it, we loop over the array in pairs,
assuming that every key has a value.

While this is the expected format, it does not hurt to be defensive
against possible bugs in the service, so explicitly check that both
key and value are non-NULL before applying them.

Spotted by papagai.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4194>
src/shell-app.c